import React from "react"
import {createFromIconfontCN} from '@ant-design/icons';

const iconScriptUrlData = localStorage.getItem('IconScriptUrl');
if (!iconScriptUrlData) {
  throw new Error('图标配置未定义');
}
const iconScriptUrl = JSON.parse(iconScriptUrlData);
const IconFont = createFromIconfontCN({
  scriptUrl: iconScriptUrl,
});

export const GIcon = (props: any) => {
  return <IconFont {...props} />;
};
